#include "CCDemo.h"

//----------------------------------------------------------------------------------------------
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, PSTR cmdLine, int showCmd)
{
	// Enable run-time memory check for debug builds.
#if defined(DEBUG) | defined(_DEBUG)
	_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif

	CCDemo* CC_app = new CCDemo(hInstance);

	if (!CC_app->Init())
		return 0;

	while (CC_app->Run() != 0)
		continue;

	CC_app->Shutdown();
	delete CC_app;
	CC_app = nullptr;

	return 0;
}